package util

import (
	"blog/pkg/setting"
)

type PagingParaDto struct {
	PageIndex int `json:"page_index"  binding:"required,gt=0"`
	PageSize  int `json:"page_size"  binding:"required,gt=1"`
}

// 校验并重新赋值
func (p *PagingParaDto) Check() bool {
	if p.PageSize < 1 {
		p.PageSize = setting.Page_Size
	}
	return true
}
